﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.echonest.api.v4;

namespace jENIKVMApi
{
    public static class TermExtensions
    {
        public static void SortByFrequency(IList<Term> terms)
        {
            var javaList = terms.ToJavaList();
            Term.sortByFrequency(javaList);
            terms.ClearAddRange(javaList.ToList<Term>());
        }

        public static void SortByWeight(IList<Term> terms)
        {
            var javaList = terms.ToJavaList();
            Term.sortByWeight(javaList);
            terms.ClearAddRange(javaList.ToList<Term>());
        }

    }
}
